package com.em.sugarfight.entity;

import com.em.sugarfight.sugarEnums.TargetType;
import lombok.Getter;

/**
 * 目标封装类
 */
@Getter
public class Target {
    // Getters and Setters
    private Position position;
    private double score;
    private TargetType type;
    private Object data; // 额外数据，如道具信息

    public Target(Position position, double score, TargetType type) {
        this.position = position;
        this.score = score;
        this.type = type;
    }

    public Target(Position position, double score, TargetType type, Object data) {
        this(position, score, type);
        this.data = data;
    }

    @Override
    public String toString() {
        return String.format("Target{pos=%s, score=%.2f, type=%s}",
                position, score, type);
    }
}
